<template>
  <div class="homeBanner">
    <Banner :BannerList="BannerList"></Banner>
  </div>
</template>

<script>
// 引入轮播图组件
import Banner from "../Banner.vue";
// 引入api
import { getBanner } from "@/utils/Api/HomeApi";
export default {
  components: {
    Banner,
  },
  data() {
    return {
      BannerList: [],
    };
  },
  mounted() {
    this.getBannerData();
  },
  methods: {
    async getBannerData() {
      let { data } = await getBanner();
      this.BannerList = data.result;
    },
  },
};
</script>

<style lang="scss">
.homeBanner {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 99;
  .prev {
    left: 280px !important;
  }
}
</style>
